package org.luckystrophe.snowtoms.model.impl;

import org.json.JSONException;
import org.json.JSONObject;
import org.luckystrophe.snowtoms.R;
import org.luckystrophe.snowtoms.model.JsonRequestPOST;

import com.googlecode.androidannotations.annotations.EBean;
import com.googlecode.androidannotations.annotations.res.StringRes;

@EBean
public class RequestSnowboxes extends JsonRequestPOST {
	
	@StringRes(R.string.api_method_getSnowbox)
	String apiMethod;
	
	private District district;

	@Override
	public JSONObject getBody() throws JSONException {
		JSONObject jo = new JSONObject();
		JSONObject params = new JSONObject();

		params.put("district", district.getDistrictNameHangul());
		params.put("districtCode", district.getDistrictCode());
		jo.put("method", apiMethod);
		jo.put("params", params);
		return jo;
	}
	
	public void setDistrict(District district){
		this.district = district;
	}

}
